<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>LC3 VM - JS</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/xterm/3.10.1/xterm.min.css" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/xterm/3.10.1/xterm.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/xterm/3.10.1/addons/fit/fit.min.js"></script>

    <script src="roms/lc3os.js"></script>
    <script src="roms/2048.js"></script>
    <script src="roms/rogue.js"></script>

    <script src="js/vm.js"></script>
    <script src="js/index.js"></script>
    <style>
        html, body {
            font-family: sans-serif;
            background-color: #eee;
            color: #333;
        }

        #container {
            max-width: 740px;
            margin: 0 auto;
        }

        #container > * {
            margin: 1rem;
        }

        #terminal {
            height: 420px;
            padding: 0.5rem;
            background-color: #1f1f1f;
            border-radius: 10px;
            border: 3px solid black;
        }
    </style>
</head>
<body>
    <div id="container">
        <div id="lc3vm">
            <h3>LC3虚拟机</h3>
            <p>
                选择程序：
                <button onclick="loadProgram(`2048`, lc3_2048);">2048</button>
                <button onclick="loadProgram(`rogue`, lc3_rogue);">Rogue</button>
                <input type="file" id="fileInput" onchange="selectRom()">
            </p>
<!--            <p>-->
<!--                <button id="switchDebug" onclick="switchDebug()">打开调试</button>-->
<!--                <button onclick="next()">下一步</button>-->
<!--            </p>-->
        </div>
        <div id="terminal"></div>
    </div>
</body>
</html>
